import _ from 'lodash'

;(async () => {
    var objects = [{ 'x': 1, 'y': 2, 'z': 3 }, { 'x': 2, 'y': 1, 'z': 1 }, { 'x': 1, 'y': 3, 'z': 3 }, { 'x': 2, 'y': 3, 'z': 1 }, { 'x': 3, 'y': 3, 'z': 1 }];
    let arr = _.uniqWith(objects, (a, b) => a.x == b.x && a.z == b.z)
    console.log(arr)
})()